/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/system/io
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AEFileOutStreamI.h
// Author:		Gianluca Belardelli
// Date:		09/10/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AEFILEOUTSTREAMI_H_
#define _AEFILEOUTSTREAMI_H_

class AEFileOutStreamI : public AEBaseFileStreamI
{
// Methods
public:
	/// \brief
	///   Initializes this file stream, optionally passing the file system that created this stream.
	AEFileOutStreamI( AEFileSystemI *lpFileSystem = 0L );

	/// \brief
	///   Destructor
	virtual ~AEFileOutStreamI( void );

	/// \brief
	///   Writes up to iLen number of bytes from pBuffer to the stream. Returns the exact number of bytes that were written.
	/// 
	/// \param pBuffer
	///   The source buffer.
	/// 
	/// \param iLen
	///   Number of bytes to write.
	/// 
	/// \return
	///   size_t : Number of actual bytes written.
	virtual AEUINT32 Write( const void *lpBuffer, AEINT32 nLen ) = 0;

	/// \brief
	///   Makes sure all data is written to disk (not necessarily supported by all file-systems).
	virtual void Flush( void ) = 0;
};

#endif // _AEFILEOUTSTREAMI_H_
